package com.ruoyi.common.constant;

/**
 * 订单状态表
 */
public enum OrderStatu {
    DaiQueRen(0, "待确认"),
    ChuLiZhong(1, "处理中"),
    YiWanCheng(2, "已完成"),
    YiGuanBi(3, "已关闭"),
    YiPingJia(4, "已评价");

    int value;
    String name;

    OrderStatu(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static OrderStatu getByValue(int value) {
        for(OrderStatu typeEnum : OrderStatu.values()) {
            if(typeEnum.value == value) {
                return typeEnum;
            }
        }
        throw new IllegalArgumentException("No element matches " + value);
    }


}
